Component({
  options: {
    addGlobalClass: true,
    pureDataPattern: /^_/, // 指定所有 _ 开头的数据字段为纯数据字段
  },
  /**
   * 组件的属性列表
   */
  properties: {
    resource: {
      type: Object,
      value: {}
    },
    messageid: {
      type: String,
      value: ''
    },
    index: {
      type: Number,
      value: 0
    }
  },

  /**
   * 组件的初始数据
   */
  data: {
    goodDefault: '../../../../assets/image/customerIntelligent/good_default.svg',
    goodSeleted: '../../../../assets/image/customerIntelligent/good_selected.svg',
    badDefault: '../../../../assets/image/customerIntelligent/bad_default.svg',
    badSeleted: '../../../../assets/image/customerIntelligent/bad_selected.svg',
  },

  /**
   * 组件的方法列表
   */
  methods: {
    onFeedback(e) {
      this.triggerEvent('submitFeedback', {
        message_feedback: e.currentTarget.dataset.status,
        message_id: this.data.messageid,
        index: this.data.index
      })
    }
  }
})